CentOS 6
Sponsored Link

OpenStack Havana - Configure Swift#1 (Auth Node)
2013/10/28
 
Configure OpenStack Object Storage (Swift).
This example configures with the environment below.
                               |
     +------------+            |            +-----------+
     |  Auth Node |10.0.0.30   |   10.0.0.50|   Proxy   |
     | (Keystone) |------------+------------|    Node   |
     +------------+            |            +-----------+
                               |
      +------------------------+-----------------------+
      |                        |                       |
      |10.0.0.51               |10.0.0.52              |10.0.0.53
+-----------+            +-----------+           +-----------+
|  Storage  |            |  Storage  |           |  Storage  |
|   Node1   |------------|   Node2   |-----------|   Node3   |
+-----------+            +-----------+           +-----------+

[1] Add Swift user or service in Keystone Server(Auth Node) first.
# add swift user

[root@dlp ~(keystone)]#
keystone user-create --tenant service --name swift --pass servicepassword --enabled true

+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | 9418cdb0791a49a68b5baf48609038a5 |
|   name   |              swift               |
| tenantId | 17867024fb23470f8005a15c6ccfed44 |
+----------+----------------------------------+

# add swift user in admin role

[root@dlp ~(keystone)]#
keystone user-role-add --user swift --tenant service --role admin
# add an entry for swift service

[root@dlp ~(keystone)]#
keystone service-create --name=swift --type=object-store --description="Swift Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |          Swift Service           |
|      id     | 29594058f8394126b003b31c37563f12 |
|     name    |              swift               |
|     type    |           object-store           |
+-------------+----------------------------------+

# define IP address for Proxy Node

[root@dlp ~(keystone)]#
export proxy_host=10.0.0.50
# add an entry for swift endpoint

[root@dlp ~(keystone)]#
keystone endpoint-create --region RegionOne \
--service swift \
--publicurl "http://$proxy_host:8080/v1/AUTH_\$(tenant_id)s" \
--internalurl "http://$proxy_host:8080/v1/AUTH_\$(tenant_id)s" \
--adminurl "http://$proxy_host:8080/v1"

+-------------+---------------------------------------------+
|   Property  |                    Value                    |
+-------------+---------------------------------------------+
|   adminurl  |           http://10.0.0.50:8080/v1          |
|      id     |       f62633d1d6bb4ff99aaebd0abfb7f4da      |
| internalurl | http://10.0.0.50:8080/v1/AUTH_$(tenant_id)s |
|  publicurl  | http://10.0.0.50:8080/v1/AUTH_$(tenant_id)s |
|    region   |                  RegionOne                  |
|  service_id |       29594058f8394126b003b31c37563f12      |
+-------------+---------------------------------------------+
 
Tweet